import request from "@/libs/request";

export function findRoleList(){
  return request({
    url:'/sys/role/roleList',
    method:'get'
  })
}

/**
 * 查询角色列表
 * @param params
 * @returns {*}
 */
export function queryRoleList(params){
  return request({
    url:'/sys/role',
    method:'get',
    params:params
  })
}

export function addRole(data){
  return request({
    url:'/sys/role',
    method:'post',
    data
  })
}

export function updateRole(data){
  return request({
    url:'/sys/role',
    method:'put',
    data
  })
}
export function deleteRole(ids){
  return request({
    url:'/sys/role/deleteRole',
    method:'delete',
    params:{ids:ids}
  })
}

/**
 * 保存角色权限
 * @param data
 * @returns {*}
 */
export function saveRolePermission(data){
  return request({
    url:'/sys/role/saveRolePermission',
    method:'post',
    data,
  })
}

